﻿using System;
using System.IO;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Cips.DataMining.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Cips.DataMining.Tests
{
	[TestClass]
	public class CsvReaderTests
	{
		[TestMethod]
		[ExpectedException(typeof(ObjectDisposedException))]
		public void StreamIsDisposedProperly()
		{
			var stream = new MemoryStream();

			using (var reader = new CsvReader(stream))
			{
			}

			stream.WriteByte(0);
		}

		[TestMethod]
		[ExpectedException(typeof(ArgumentNullException))]
		public void StreamCannotBeNull()
		{
			new CsvReader(null);
		}
	}
}
